//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.topvision.myviewtest.well.misc;

import android.util.Log;

public class HSMLog {
    private static boolean SHOW_DEBUG = false;
    private static final String TAG = "HSMLog";

    public HSMLog() {
    }

    public static void Enable(boolean enable) {
        SHOW_DEBUG = enable;
    }

    public static void d(String tag, String msg) {
        if(SHOW_DEBUG) {
            Log.d(tag, msg);
        }

    }

    public static void d(String msg) {
        if(SHOW_DEBUG) {
            Log.d("HSMLog", msg);
        }

    }

    public static void trace() {
        if(SHOW_DEBUG) {
            StackTraceElement element = Thread.currentThread().getStackTrace()[3];
            Log.d("HSMLog", "Class: " + element.getClassName() + " Method: " + element.getMethodName());
        }

    }

    public static void e(Exception e) {
        StackTraceElement element = e.getStackTrace()[0];
        Log.e("HSMLog", "Caught Exception in Class: " + element.getClassName() + "\r\nMethod: " + element.getMethodName() + "()\r\nMessage: " + e.getMessage());
    }

    public static void e(String msg) {
        Log.e("HSMLog", msg);
    }
}
